<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <ul>
      <li v-for="(item,index) of list" :key = "index">{{ item.area }}</li>
    </ul>
  </div>
</body>
<script src="lib/vue.js"></script>
<script src="lib/axios.min.js"></script>
<script>
  axios.interceptors.request.use(function(config){ 
    // 在请求发出去之前进行一些信息设置 
    console.log('loading......')
    return config; 
  },function(err){ 
    // 处理响应的错误信息 
  });

  axios.interceptors.response.use(function(res){ 
    // res为axios对象 
    console.log('loading end')
    return res; 
  },function(err){ 
    // 处理响应的错误信息 
  });
  new Vue({
    el: '#app',
    data: {
      list: []
    },
    mounted () {
      // axios.get('https://api.i-lynn.cn/college')
      //   .then(res => {
      //     console.log(res)
      //     this.list = res.data.data.list
      //   })
      axios({
        url: 'https://api.i-lynn.cn/college',
        method: 'GET',
        headers: {
          'content-type': 'application/json'
        }
      }).then(res => {
        console.log(res)
        this.list = res.data.data.list
      })
    }
  })
</script>
</html>